<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/taglib.jsp"%>
<div>
	<table class="hs-table">
		<tbody>
			<tr>
				<th>资源名称</th>
				<th>资源说明</th>
				<th>关联角色</th>
				<th>操作</th>
			</tr>
			<c:forEach var="resource" items="${dataPaging.result}">
				<tr>
					<td><c:out value="${resource.resource}" /></td>
					<td><c:out value="${resource.intro}" /></td>
					<td><c:forEach var="roleResource" items="${roleResources}">
							<c:if test="${resource.id eq roleResource.resourceId}">
								<c:forEach var="role" items="${roles}">
									<c:if test="${role.id eq roleResource.roleId}">
										<c:out value="${role.cnname}" />
									</c:if>
								</c:forEach>
							</c:if>
						</c:forEach></td>
					<td><a href="${admin}/manager/resource/edit/${resource.id}">修改</a> <a
						href="${admin}/manager/resource/delete/${resource.id}" class="delete">删除</a>
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<hs:pager dataPaging="${dataPaging}" action="${admin}/manager/resource" showPageNumber="10"/>
	<a href="${admin}/manager/resource/create">添加</a>
</div>